﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ledict.ConditionExtract.Model;
using Ledict.ConditionExtract.Common;
using Ledict.ConditionExtract.DAL;
using System.Data;
namespace Ledict.ConditionExtract.BLL
{
    public class ArgumentTypeXmlBLL
    {
        ArgumentTypeXmlDAL argumenttypexmldal = new ArgumentTypeXmlDAL();
        ArgumentDAL _argumentDal = new ArgumentDAL();

        ArgumentTypeDAL atd = new ArgumentTypeDAL();

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public SYS_ArgumentTypeXml GetModel(string CCID)
        {
            return argumenttypexmldal.GetModel(CCID);
        }
        public bool Update(SYS_ArgumentTypeXml Model)
        {
            return argumenttypexmldal.Update(Model);

        }

        public DataTable GetAllModel()
        {
            return argumenttypexmldal.GetAllModel();
        }

        /// <summary>
        /// 根据字典类型，获取字典列表
        /// </summary>
        /// <param name="code">字典类型</param>
        /// <returns></returns>
        public DataTable GetArgumentDtByType(string code)
        {
            return _argumentDal.GetArgumentDtByType(code);
        }

        /// <summary>
        /// 根据字典类型和字典名称，查看字典名称是否存在
        /// </summary>
        /// <param name="name">字典名称</param>
        /// <param name="typeCode">字典类型编码</param>
        /// <returns></returns>
        public bool IsExist(string name, string typeCode)
        {
            return _argumentDal.IsExist(name, typeCode);
        }

        /// <summary>
        /// 修改字典值名称，通过Am_ID
        /// </summary>
        public bool UpdateName(SYS_Argument model)
        {
            return _argumentDal.UpdateName(model);
        }


        /// <summary>
        /// 添加字典实体
        /// </summary>
        public bool Add(SYS_Argument model)
        {
            return _argumentDal.Add(model);
        }

        /// <summary>
        /// 删除字典值，通过字典ID
        /// </summary>
        /// <param name="am_id">字典ID</param>
        /// <returns></returns>
        public bool Delete(string am_id)
        {
            return _argumentDal.Delete(am_id);
        }

        public SYS_ArgumentType Get_AT_MatchKeyWordBll(string aaa)
        {
            return atd.Get_AT_MatchKeyWord(aaa);
        }

        /// <summary>
        /// 获取诉讼地位字典值
        /// </summary>
        /// <returns></returns>
        public string GetSSDWKeyWord()
        {
            return atd.GetSSDWKeyWord();
        }


        /// <summary>
        /// 获取货币单位字典值
        /// </summary>
        /// <returns></returns>
        public string GetHBDWKeyWord()
        {
            return atd.GetHBDWKeyWord();
        }

        /// <summary>
        /// 获取是否有字典值
        /// </summary>
        /// <param name="atName"></param>
        /// <param name="atCauseId"></param>
        /// <param name="keyword"></param>
        /// <returns></returns>
        public string GetZiDianZhi(string atName, string atCauseId, string keyword)
        {
            return atd.GetZiDianZhi(atName, atCauseId, keyword);
        }
        }
}
